home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
-
- File: ISpTestMain.h
-
- Copyright © 1996, 1997, 1998 Apple Computer, Inc., All Rights Reserved
-
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
-
- *************************************************************************************/
-
-
- #pragma once
-
- #include <LApplication.h>
- #include <InputSprocket.h>
-
- class CPPStarterApp : public LApplication {
- public:
- CPPStarterApp(); // constructor registers all PPobs
- virtual ~CPPStarterApp(); // stub destructor
-
- // this overriding function performs application functions
-
- virtual Boolean ObeyCommand(CommandT inCommand, void* ioParam);
-
- // this overriding function returns the status of menu items
-
- virtual void FindCommandStatus(CommandT inCommand,
- Boolean &outEnabled, Boolean &outUsesMark,
- Char16 &outMark, Str255 outName);
-
- virtual void EventResume (const EventRecord &inMacEvent);
- virtual void EventSuspend (const EventRecord &inMacEvent);
-
- enum
- {
- cmd_Suspend = 1000,
- cmd_Resume = 1001,
- cmd_NextElement = 1002,
- cmd_PrevElement = 1003,
- cmd_AddElement = 1004,
- cmd_DeleteElement = 1005,
- cmd_UIStart = 1006,
- cmd_UIConfigure = 1007,
- cmd_UIStop = 1008,
- cmd_ActivateKeyboard = 1009,
- cmd_ActiveMouse = 1010,
- cmd_DeactiveBoth = 1011
- };
-
- enum
- {
- kIconSuiteID_XThrust = 128,
- kIconSuiteID_YThrust,
- kIconSuiteID_ZThrust,
- kIconSuiteID_Look,
- kIconSuiteID_Fire,
- kIconSuiteID_Thrust,
- kIconSuiteID_Pause,
- kIconSuiteID_Start
- };
-
-
- enum
- {
- kNumNeeds = 7
- };
-
- ISpNeed mNeeds[kNumNeeds];
- ISpElementReference mVirtualElements[kNumNeeds];
-
- void InitNeeds(void);
-
- protected:
-
- virtual void StartUp(); // overriding startup functions
- };